package com.bos.data.model;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "bos_user", schema = "dbo", catalog = "")
public class BosUserModel {
    private int id;
    private String userId;
    private String name;
    private String password;
    private String mobile;
    private int power;
    private String department;
    private String email;
    private String position;
    private String gender;
    private String status;
    private String entryTime;
    private String zhanghao;
    private String avatar;

    @Id
    @Column(name = "id")
    @GeneratedValue
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "userId")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Basic
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "power")
    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

    @Basic
    @Column(name = "department")
    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    @Basic
    @Column(name = "email")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "position")
    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    @Basic
    @Column(name = "gender")
    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "entryTime")
    public String getEntryTime() {
        return entryTime;
    }

    public void setEntryTime(String entryTime) {
        this.entryTime = entryTime;
    }

    @Basic
    @Column(name = "zhanghao")
    public String getZhanghao() {
        return zhanghao;
    }

    public void setZhanghao(String zhanghao) {
        this.zhanghao = zhanghao;
    }
    @Basic
    @Column(name = "avatar")
    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }



    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BosUserModel that = (BosUserModel) o;
        return id == that.id &&
                power == that.power &&
                Objects.equals(userId, that.userId) &&
                Objects.equals(name, that.name) &&
                Objects.equals(password, that.password) &&
                Objects.equals(mobile, that.mobile) &&
                Objects.equals(department, that.department) &&
                Objects.equals(email, that.email) &&
                Objects.equals(position, that.position) &&
                Objects.equals(gender, that.gender) &&
                Objects.equals(status, that.status) &&
                Objects.equals(entryTime, that.entryTime) &&
                Objects.equals(zhanghao, that.zhanghao);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, userId, name, password, mobile, power, department, email, position, gender, status, entryTime, zhanghao);
    }

    public BosUserModel(){};
    public BosUserModel(String userid, String name, String department, String mobile,
                String email, String position, String gender) {
        super();
        this.userId = userid;
        this.name = name;
        this.department = department;
        this.mobile = mobile;
        this.email = email;
        this.position = position;
        this.gender = gender;
    }


    public BosUserModel(String userId, String name, String password, String mobile,
                int power, String department, String email, String position,
                String gender, String status, String entryTime) {
        super();
        this.userId = userId;
        this.name = name;
        this.password = password;
        this.mobile = mobile;
        this.power = power;
        this.department = department;
        this.email = email;
        this.position = position;
        this.gender = gender;
        this.status = status;
        this.entryTime = entryTime;
    }
    public BosUserModel(String userid, String name, String mobile, String password,
                String gender, int power) {
        super();
        this.userId = userid;
        this.name = name;
        this.mobile = mobile;
        this.password = password;
        this.gender = gender;
        this.power = power;
    }



    public BosUserModel(String userId, String name, String mobile, int power,
                String department, String email, String position,
                String gender, String status, String entryTime) {
        super();
        this.userId = userId;
        this.name = name;
        this.mobile = mobile;
        this.power = power;
        this.department = department;
        this.email = email;
        this.position = position;
        this.gender = gender;
        this.status = status;
        this.entryTime = entryTime;
    }
}
